Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(free-units): Add free_units_per_events and free_units_per_total_aggregation #384

Merged
merged 8 commits into from
Aug 22, 2022

Conversation

rsempe
Copy link
Collaborator

@rsempe rsempe commented Aug 16, 2022

Context

We want to add the ability to:

  • Apply a fixed fee per distinct transaction
  • Apply free units on the number of distinct transactions or on the monetary total amount

Description

This is the second step of adding fixed amount and free units to the percentage charge.

The goal of this PR is to:

  • Remove fixed_amount_target from Charge#properties
  • Add free_units_per_events to Charge#properties
  • Add free_units_per_total_aggregation to Charge#properties
  • Add the migration for managing existing customers
  • Update GraphQL endpoints

⚠️ The percentage service will be updated on a next PR to take into consideration free units.

Related Task

getlago/lago#92

How Has This Been Tested?

A full QA will be performed when the feature will be 100% implemented.

@rsempe rsempe force-pushed the free-units-migration branch 2 times, most recently from 10c2d69 to df2ca4a Compare August 16, 2022 13:32
@rsempe rsempe force-pushed the free-units-migration branch from df2ca4a to 775126a Compare August 16, 2022 14:02
Copy link
Collaborator

@vincent-pochet vincent-pochet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@rsempe rsempe force-pushed the free-units-migration branch from 775126a to 1ac5370 Compare August 18, 2022 09:27
@rsempe rsempe self-assigned this Aug 19, 2022
@rsempe rsempe changed the title feat(:free-units): Add free_units_per_events and free_units_per_total_aggregation feat(free-units): Add free_units_per_events and free_units_per_total_aggregation Aug 22, 2022
@rsempe rsempe merged commit 6fac159 into main Aug 22, 2022
@rsempe rsempe deleted the free-units-migration branch August 22, 2022 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants